package com.heima.test01;

import java.util.Scanner;

public class Demo02 {
    public static void main(String[] args) {
        login();
    }
    public static void login() {
        String id = "1234";
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入身份证后四位登录");
        String s = sc.nextLine();
        if (id.equals(s)) {
            System.out.println("登陆成功");
            return;
        }
        login();
    }
}
